package org.patterns.creational.builder;


public class Client {
    public static void main(String[] args) {
        //反射生成具体建造者对象
        ActorBuilder builder = (ActorBuilder) XMLUtil.getBean();
        //指挥者Director：调用具体建造者的方法，按照一定的顺序或逻辑来构建产品
        ActorDirector director = new ActorDirector();
        Actor actor = director.construct(builder); //通过指挥者创建完整的建造者对象

        String type = actor.getType();
        System.out.println(type + "的外观：");
        System.out.println("性别：" + actor.getSex());
        System.out.println("面容：" + actor.getFace());
        System.out.println("服装：" + actor.getCostume());
        System.out.println("发型：" + actor.getHairstyle());
    }
}